Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate DurableTask.ServiceBus Table and Blob store SDK from WindowsAzure.Storage to Azure.Data.Tables and Azure.Storage.Blobs #1112

Merged
merged 13 commits into from
Jun 25, 2024

Conversation

arlynch
Copy link
Member

@arlynch arlynch commented Jun 6, 2024

Notable Changes

  • The class CloudStorageAccount no longer exists in the new libraries. Therefore, any constructors that leverage it were replaced with new constructors that take an endpoint to the store and a TokenCredentials object
  • TableStore entities were able to implement a method that allowed the code to "unpack" complex types to save and load from tables. These methods are no longer available. Instead, a series of public accessors with custom getters and setters are now used to get the same behavior.

Validation

  • Running DurableTask.ServiceBus.Tests project: Test runs are green via both the pipeline and running tests against a live storage account

Copy link
Collaborator

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few preliminary questions. The changes make sense at first glance, but I see many instances where properties are marked with "IgnoreDataMember" only to be replaced by slightly differently-named properties below; I'm unsure why we cannot just change the implementation of the pre-existing properties.

Thank you for this PR!

/// Creates a new AzureStorageBlobStore using the supplied hub name and cloud storage account
/// Creates a new AzureStorageBlobStore using the supplied hub name, endpoint and token credential
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirming - does this mean that only managed identity (i.e token credentials, right?) would be supported now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To preserve previous functionality, we are maintaining support for connection strings. The breaking change is to introduce support for token credentials and removing support for the "cloud storage account" as that class no longer exists in the new Azure SDK.

src/DurableTask.ServiceBus/Tracking/AzureTableClient.cs Outdated Show resolved Hide resolved

/// <summary>
/// Gets or sets the entity etag
/// </summary>
public string ETag { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropping these (and other public fields) is technically a breaking change. Just jotting this down for down, still unsure what replaces this (or if functionality was dropped)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is being replaced with an ETag class provided by Azure Core, and a required part of the new Azure SDK. While unfortunate this is a breaking change, this should not change functionality in a substantial manner.

// In order to maintain table schema with the new Azure SDK, we need the following accessor.
// As a result, this HistoryEventJson does not need to be documented.
[DataMember(Name = "HistoryEvent")]
public string HistoryEventJson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused - why can't these getter and setter be part of the HistoryEvent declared above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To preserve functionality, I thought it best to allow the HistoryEvent object be accessed via default getters and setters. This HistoryEventJson property only exists to allow the entity to cooperate with the new Azure SDK, as table read and writes for entities now behave differently.

Copy link
Contributor

@NateLehman NateLehman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢 it

Copy link
Collaborator

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM - just a few requests in terms of adding comments and naming regions. Afterwards, I'll be ready to approve.

@davidmrdavid davidmrdavid merged commit 0af3eca into Azure:main Jun 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants